package Shapes;

import java.awt.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 23735
 * Date: 2022-12-16
 * Time: 13:47
 */

/**
 * 直线
 */
public class Line extends Shape{
    public Line(int x1,int y1,int x2,int y2,Color color,int size){
        super(x1,y1,x2,y2,color,size);
    }

    //重写父类的draw方法
    @Override
    public void draw(Graphics graphics) {
        super.draw(graphics);
        super.graphics2D.drawLine(x1,y1,x2,y2);
    }
}
